home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Ghostscript / src / gxpcache.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-01  |  1.9 KB  |  56 lines

  1. /* Copyright (C) 1997 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of AFPL Ghostscript.
  4.   
  5.   AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author or
  6.   distributor accepts any responsibility for the consequences of using it, or
  7.   for whether it serves any particular purpose or works at all, unless he or
  8.   she says so in writing.  Refer to the Aladdin Free Public License (the
  9.   "License") for full details.
  10.   
  11.   Every copy of AFPL Ghostscript must include a copy of the License, normally
  12.   in a plain ASCII text file named PUBLIC.  The License grants you the right
  13.   to copy, modify and redistribute AFPL Ghostscript, but only under certain
  14.   conditions described in the License.  Among other things, the License
  15.   requires that the copyright notice and this notice be preserved on all
  16.   copies.
  17. */
  18.  
  19. /*$Id: gxpcache.h,v 1.2 2000/09/19 19:00:39 lpd Exp $ */
  20. /* Definition of Pattern cache */
  21.  
  22. #ifndef gxpcache_INCLUDED
  23. #  define gxpcache_INCLUDED
  24.  
  25. /*
  26.  * Define a cache for rendered Patterns.  This is currently an open
  27.  * hash table with single probing (no reprobing) and round-robin
  28.  * replacement.  Obviously, we can do better in both areas.
  29.  */
  30. #ifndef gx_pattern_cache_DEFINED
  31. #  define gx_pattern_cache_DEFINED
  32. typedef struct gx_pattern_cache_s gx_pattern_cache;
  33.  
  34. #endif
  35. #ifndef gx_color_tile_DEFINED
  36. #  define gx_color_tile_DEFINED
  37. typedef struct gx_color_tile_s gx_color_tile;
  38.  
  39. #endif
  40. struct gx_pattern_cache_s {
  41.     gs_memory_t *memory;
  42.     gx_color_tile *tiles;
  43.     uint num_tiles;
  44.     uint tiles_used;
  45.     uint next;            /* round-robin index */
  46.     ulong bits_used;
  47.     ulong max_bits;
  48.     void (*free_all) (P1(gx_pattern_cache *));
  49. };
  50.  
  51. #define private_st_pattern_cache() /* in gxpcmap.c */\
  52.   gs_private_st_ptrs1(st_pattern_cache, gx_pattern_cache,\
  53.     "gx_pattern_cache", pattern_cache_enum, pattern_cache_reloc, tiles)
  54.  
  55. #endif /* gxpcache_INCLUDED */
  56.